package com.lggry.object;

public class Student {
    String name;
    double Chinese;
    double Math;
    double English;
    public void printInfo(){
        System.out.println("姓名：" + name);
        System.out.println("语文成绩：" + Chinese);
        System.out.println("数学成绩：" + Math);
        System.out.println("英语成绩：" + English);
    }

    public void printTotal(){
        double total = Chinese + Math + English;
        System.out.println("总成绩：" + total);
    }

    public void printAvg(){
        double avg = (Chinese + Math + English) / 3;
        System.out.println("平均成绩：" + avg);
    }
}
